package summer_vacation.xuejiahua;

import java.util.Scanner;

/**
 * Created by Administrator on 2015/8/26.
 */
public class java_38 {
    public static void main(String[] args){
    Scanner s = new Scanner(System.in);
    System.out.println("请输入整数1：");
    int a = s.nextInt();
    System.out.println("请输入整数2：");
    int b = s.nextInt();
    System.out.println("请输入要进行计算的运算符：");
    String str1= s.nextLine();
    String str = s.nextLine();
    char c = str.charAt(0);
    switch(c){
        case '+' :
            System.out.println(a + "+" + b + "=" + (a+b));
            break;
        case '-' :
            System.out.println(a + "-" + b + "=" + (a-b));
            break;
        case '*' :
            System.out.println(a + "*" + b + "=" + (a*b));
            break;
        case '/' :
            System.out.println(a + "/" + b + "=" + (a/b));
            break;
        case '%' :
            System.out.println(a + "%" + b + "=" + (a%b));
            break;
        default :
            System.out.println("出错了！");

    }

}


}
